
package com.rongcheng.forfeature;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.rongcheng.forfeature.adapter.TestAdapter;
import com.rongcheng.forfeature.utils.RecycleViewDivider;
import com.rongcheng.forfeature.utils.SimplePaddingDecoration;

public class recylcer_view_test extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_recylcer_view_test);

        RecyclerView recylcer_view_test = (RecyclerView) findViewById(R.id.recylcer_view_test);
        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
        linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
        recylcer_view_test.setLayoutManager(linearLayoutManager);
        recylcer_view_test.addItemDecoration(new RecycleViewDivider(this, LinearLayoutManager.VERTICAL, 20, R.color.colorAccent));
//        recylcer_view_test.addItemDecoration(new SimplePaddingDecoration(50));
        TestAdapter testAdapter = new TestAdapter();
        recylcer_view_test.setAdapter(testAdapter);
    }
}
